<page-header recursiveBreadcrumb>

</page-header>

<div nz-row [nzGutter]="16">
  <div nz-col class="gutter-row" [nzSpan]="4">
    <nz-card nzTitle="资源组">
      <nz-tree nzBlockNode [nzData]="groupInfo" nzShowLine [nzSelectedKeys]="selectedGroups" (nzClick)="groupClick($event)"></nz-tree>
    </nz-card>
  </div>
  <div nz-col [nzSpan]="20">
    <nz-card [nzExtra]="resourceTemplate" nzTitle="资源">
      <sf mode="search" [schema]="searchSchema" (formSubmit)="query($event)" (formReset)="st.reset($event)"></sf>
      <st
        #st
        [data]="page.records"
        [columns]="columns"
        (change)="change($event)"
        [pi]="page.current"
        [ps]="page.size"
        [total]="page.total"
        [page]="pagination"
      >
        <ng-template st-row="operation" let-item let-index="index">
          <nz-switch [ngModel]="item.checked" (ngModelChange)="changeResource(item, $event)"></nz-switch> </ng-template
      ></st>
    </nz-card>
    <ng-template #resourceTemplate>
      <nz-radio-group [(ngModel)]="currentResourceFilter" (ngModelChange)="query({ deleted: $event })" style="margin-right: 30px">
        <label nz-radio-button nzValue="">全部</label>
        <label nz-radio-button nzValue="false">启用</label>
        <label nz-radio-button nzValue="true">禁用</label>
      </nz-radio-group>
    </ng-template>
  </div>
</div>
